<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="box">
        <button @click="show">显示仓库内容</button>
    </div>
</body>
<script src="./node_modules/vue/dist/vue.js"></script>
<!-- 引入Vuex的依赖 -->
<script src="./node_modules/vuex/dist/vuex.js"></script>
<script>

    console.log(Vuex);
    //创建仓库
    let store = new Vuex.Store({
        state:{
            count:888
        },
        //改变值的操作
        mutations:{
            increment:function(state){
                state.count+=1;
            }
        }
    })

    // Vue.use(Vuex)
    let ve = new Vue({
        el:"#box",
        methods:{
            show:function(){
                console.log(this.$store);
            }
        }
    })

</script>
</html>